<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CrateShopCategoryTable extends Migration
{
    public function up()
    {
        //产品类别
        Schema::create('shop_category', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('pid')->default(0)->comment('父级ID');
            $table->string('name')->comment('分类名称');
            $table->boolean('status')->default(true)->comment('状态 0=不显示 1=显示');
            $table->tinyInteger('sort')->default(50)->comment('排序');
            $table->timestamps();
        });
    }
    public function down()
    {
        Schema::dropIfExists('shop_category');
    }
}
